<header class="flowa-navbar">
  <div class="flowa-nav-inner flowa-container">
    <div class="flowa-nav-left">
      <a class="brand" href="/flowa">
        <div class="logo-placeholder"></div>
        <span>{{ _("Flowa OMS") }}</span>
      </a>
      <nav class="flowa-nav" data-flowa-nav>
        <div class="nav-item">
          <a class="nav-link nav-home" data-home="1" data-title="{{ _("首页") }}" data-i18n="首页" href="/flowa">{{ _("首页") }}</a>
        </div>
        <div class="nav-item has-dropdown" data-menu="inbound">
          <button type="button" class="nav-trigger" data-i18n="入库">{{ _("入库") }}</button>
          <div class="nav-dropdown">
            <a class="nav-link" data-title="{{ _("入仓预报单") }}" data-i18n="入仓预报单" href="/app/material-request">{{ _("入仓预报单") }}</a>
            <a class="nav-link" data-title="{{ _("装箱单") }}" data-i18n="装箱单" href="/app/packing-information">{{ _("装箱单") }}</a>
            <a class="nav-link" data-title="{{ _("入库单") }}" data-i18n="入库单" href="/app/stock-entry/view/list">{{ _("入库单") }}</a>
          </div>
        </div>

        <div class="nav-item has-dropdown" data-menu="orders">
          <button type="button" class="nav-trigger" data-i18n="订单">{{ _("订单") }}</button>
          <div class="nav-dropdown">
            <a class="nav-link" data-title="{{ _("Shopify订单") }}" data-i18n="Shopify订单" href="/app/list/Sales Order/List">{{ _("Shopify订单") }}</a>
            <a class="nav-link pending" data-title="{{ _("订单操作日志") }}" data-i18n="订单操作日志" href="#">{{ _("订单操作日志") }}</a>
            <a class="nav-link" data-title="{{ _("出库单") }}" data-i18n="出库单" href="/app/list/Delivery Note/List">{{ _("出库单") }}</a>
          </div>
        </div>

        <div class="nav-item has-dropdown" data-menu="warehouse">
          <button type="button" class="nav-trigger" data-i18n="仓库管理">{{ _("仓库管理") }}</button>
          <div class="nav-dropdown">
            <a class="nav-link" data-title="{{ _("物料组管理") }}" data-i18n="物料组管理" href="/app/list/Item Group/List">{{ _("物料组管理") }}</a>
            <a class="nav-link" data-title="{{ _("Item 管理") }}" data-i18n="Item 管理" href="/app/list/Item/List">{{ _("Item 管理") }}</a>
            <a class="nav-link" data-title="{{ _("仓库管理") }}" data-i18n="仓库管理" href="/app/list/Warehouse/List">{{ _("仓库管理") }}</a>
            <a class="nav-link" data-title="{{ _("仓库地址管理") }}" data-i18n="仓库地址管理" href="/app/list/Address/List">{{ _("仓库地址管理") }}</a>
            <a class="nav-link" data-title="{{ _("仓库库存") }}" data-i18n="仓库库存" href="/app/list/WDT Shopify Inventory Snapshot Inst/List">{{ _("仓库库存") }}</a>
          </div>
        </div>

        <div class="nav-item has-dropdown" data-menu="logistics">
          <button type="button" class="nav-trigger" data-i18n="物流">{{ _("物流") }}</button>
          <div class="nav-dropdown">
            <a class="nav-link" data-title="{{ _("物流订单跟踪") }}" data-i18n="物流订单跟踪" href="/oms_tracking">{{ _("物流订单跟踪") }}</a>
            <a class="nav-link" data-title="{{ _("异常物流单跟踪") }}" data-i18n="异常物流单跟踪" href="/oms_exception">{{ _("异常物流单跟踪") }}</a>
            <a class="nav-link pending" data-title="{{ _("物流标准 SOP") }}" data-i18n="物流标准 SOP" href="#">{{ _("物流标准 SOP") }}</a>
          </div>
        </div>

        <div class="nav-item has-dropdown" data-menu="recharge">
          <button type="button" class="nav-trigger" data-i18n="充值对账">{{ _("充值对账") }}</button>
          <div class="nav-dropdown nav-columns">
            <div class="nav-column">
              <a class="nav-link" data-title="{{ _("物流产品签约") }}" data-i18n="物流产品签约" href="/app/logistics-product-definition">{{ _("物流产品签约") }}</a>
              <a class="nav-link" data-title="{{ _("充值管理") }}" data-i18n="充值管理" href="/app/oms_payment">{{ _("充值管理") }}</a>
              <a class="nav-link pending" data-title="{{ _("账期管理") }}" data-i18n="账期管理" href="#">{{ _("账期管理") }}</a>
            </div>
            <div class="nav-column">
              <div class="nav-subtitle" data-i18n="账单管理">{{ _("账单管理") }}</div>
              <a class="nav-link pending" data-title="{{ _("发票管理") }}" data-i18n="发票管理" href="#">{{ _("发票管理") }}</a>
              <a class="nav-link pending" data-title="{{ _("汇总账单") }}" data-i18n="汇总账单" href="#">{{ _("汇总账单") }}</a>
              <a class="nav-link pending" data-title="{{ _("入库账单") }}" data-i18n="入库账单" href="#">{{ _("入库账单") }}</a>
              <a class="nav-link pending" data-title="{{ _("出库账单") }}" data-i18n="出库账单" href="#">{{ _("出库账单") }}</a>
              <a class="nav-link pending" data-title="{{ _("库存账单") }}" data-i18n="库存账单" href="#">{{ _("库存账单") }}</a>
            </div>
          </div>
        </div>

        <div class="nav-item has-dropdown" data-menu="support">
          <button type="button" class="nav-trigger" data-i18n="客服服务">{{ _("客服服务") }}</button>
          <div class="nav-dropdown">
            <a class="nav-link" data-title="{{ _("问题单管理") }}" data-i18n="问题单管理" href="/app/list/Issue/List">{{ _("问题单管理") }}</a>
            <a class="nav-link" data-title="{{ _("任务跟踪") }}" data-i18n="任务跟踪" href="/app/list/task/List">{{ _("任务跟踪") }}</a>
          </div>
        </div>

        <div class="nav-item has-dropdown" data-menu="settings">
          <button type="button" class="nav-trigger" data-i18n="系统设置">{{ _("系统设置") }}</button>
          <div class="nav-dropdown">
            <a class="nav-link" data-title="{{ _("员工账号管理") }}" data-i18n="员工账号管理" href="/app/staff-user">{{ _("员工账号管理") }}</a>
            <a class="nav-link" data-title="{{ _("店铺配置") }}" data-i18n="店铺配置" href="/app/usershop">{{ _("店铺配置") }}</a>
            <a class="nav-link" data-title="{{ _("物流分拣配置") }}" data-i18n="物流分拣配置" href="/app/shop-picker-rule">{{ _("物流分拣配置") }}</a>
          </div>
        </div>
      </nav>
    </div>
    <div class="flowa-nav-right">
      <div class="lang">
        <span id="flowa-lang-label" data-i18n="语言">{{ _("语言") }}</span>：
        <select id="flowa-lang-select">
          <option value="zh">{{ _("简体中文版") }}</option>
          <option value="en">{{ _("English") }}</option>
        </select>
      </div>
      <div class="user-menu-wrapper" id="flowa-user-menu-wrapper">
        <button type="button" class="user-chip" id="flowa-user-menu-toggle">
          <span class="avatar">{{ (frappe.session.user or 'F')[:1]|upper }}</span>
          <span class="name">{{ frappe.get_fullname(frappe.session.user) if frappe.session.user else 'Guest' }}</span>
          <span class="chevron">▾</span>
        </button>
        <div class="user-dropdown" id="flowa-user-menu" hidden>
          <button type="button" class="dropdown-item" data-url="/app/user-profile" data-title="{{ _("My Profile") }}">{{ _("My Profile") }}</button>
          <button type="button" class="dropdown-item" data-url="/app/Form/User/{{ frappe.session.user | urlencode }}" data-title="{{ _("My Settings") }}">{{ _("My Settings") }}</button>
          <button type="button" class="dropdown-item" data-url="/app/Form/Session%20Default%20Settings/Session%20Default%20Settings" data-title="{{ _("Session Defaults") }}">{{ _("Session Defaults") }}</button>
          <div class="divider"></div>
          <button type="button" class="danger logout-action">{{ _("Log out") }}</button>
        </div>
      </div>
    </div>
  </div>
</header>

<div class="flowa-iframe-modal" id="flowa-iframe-modal" hidden>
  <div class="modal-backdrop" id="flowa-iframe-backdrop"></div>
  <div class="modal-container" role="dialog" aria-modal="true">
    <div class="modal-header">
      <span class="modal-title" id="flowa-iframe-title"></span>
      <button type="button" class="modal-close" id="flowa-iframe-close" aria-label="{{ _("Close") }}">×</button>
    </div>
    <div class="modal-content">
      <iframe id="flowa-iframe" src="" frameborder="0"></iframe>
    </div>
  </div>
</div>


